<html>
<head>
<meta NAME="author" CONTENT="Peter Csizmadia">
    <script type="text/javascript" src="../../sh_main.js"></script>
    <script type="text/javascript" src="../../sh_javascript.js"></script>
    <script type="text/javascript" src="../../sh_html.js"></script>
    <link REL ="stylesheet" TYPE="text/css" HREF="../../sh_nedit.css" TITLE="Style">
<link REL ="stylesheet" TYPE="text/css" HREF="../../../marvinmanuals.css" TITLE="Style">
<title>MarvinSketch Example - Setting colors</title>
</head>
<body onload="sh_highlightDocument();">

<h1>MarvinSketch Example - Setting colors</h1>

The color of the canvas can optionally be modified by applet parameters.
By default it is set to white as shown in the example below.

<p>
<center>
<script LANGUAGE="JavaScript1.1" SRC="../../../marvin.js"></script>
<script LANGUAGE="JavaScript1.1">
<!--
msketch_begin("../../..", 540, 480);
msketch_param("molbg", "#ffffff");
msketch_end();
//-->
</script>
</center>

<blockquote>
<pre class="sh_html">
&lt;script LANGUAGE=&quot;JavaScript1.1&quot; SRC=&quot;../../../<a HREF="../marvin.js.txt">marvin.js</a>&quot;&gt;&lt;/script&gt;
&lt;script LANGUAGE=&quot;JavaScript1.1&quot;&gt;
&lt;!--
</pre><pre class="sh_javascript">
msketch_begin(&quot;../../..&quot;, 540, 480);
msketch_param(&quot;<a HREF="../../../help/developer/sketchman.html#parameters.molbg">molbg</a>&quot;, &quot;#ffffff&quot;);
msketch_end();
</pre><pre class="sh_html">//--&gt;
&lt;/script&gt;
</pre>
</blockquote>

By default atoms and bonds drawn on the canvas are shown in the CPK color scheme,
but the coloration can be disabled by
using the <a HREF="../../../help/developer/sketchman.html#parameters.colorScheme">colorScheme</a>
parameter. In the example below the color sheme is set to Monochrome, while the color of the canvas is set to black.

<p>
<center>
<script LANGUAGE="JavaScript1.1">
<!--
msketch_begin("../../..", 540, 480);
msketch_param("molbg", "#000000");
msketch_param("colorScheme", "mono");
msketch_end();
//-->
</script>
</center>

<blockquote>
<pre class="sh_html">
&lt;script LANGUAGE=&quot;JavaScript1.1&quot;&gt;
&lt;!--
</pre><pre class="sh_javascript">
msketch_begin(&quot;../../..&quot;, 540, 480);
msketch_param(&quot;<a HREF="../../../help/developer/sketchman.html#parameters.molbg">molbg</a>&quot;, &quot;#000000&quot;);
msketch_param(&quot;<a HREF="../../../help/developer/sketchman.html#parameters.colorScheme">colorScheme</a>&quot;, &quot;mono&quot;);
msketch_end();
</pre><pre class="sh_html">//--&gt;
&lt;/script&gt;
</pre>
</blockquote>

Note that only the color of the canvas is defined by the parameter
while the white foreground color is set automatically by the program.

<p>
<center><div class="lenia">&nbsp;</div></center>
<p>
In the <a HREF="splashscreen.html">next example</a>, you can use a custom splash screen image.
</body>
</html>
